﻿using System.Security.Cryptography;
using System.Text;

namespace OnlineFIR.Utilities
{
    public static class MD5HashString
    {
        public static string Get(string s)
        {
            byte[] b = MD5.HashData(Encoding.UTF8.GetBytes(s));
            StringBuilder sb = new StringBuilder();
            foreach (byte item in b)
            {
                sb.Append(item.ToString("X2"));
            }
            return sb.ToString();
        }
    }
}
